Skip to content

Allow .api.aws endpoints#758

Merged
chenliu0831 merged 8 commits into
mainfrom
allow-api-aws-endpoints
Jun 10, 2025
Merged

Allow .api.aws endpoints#758
chenliu0831 merged 8 commits into
mainfrom
allow-api-aws-endpoints

Conversation

@shwdean

@shwdean shwdean commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Description of changes:

Datazone endpoints end in .api.aws instead of .amazonaws.com.

ApiStandardTerminology made public for testing and convenience.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

import java.util.Set;

final class ApiStandardTerminology {
public final class ApiStandardTerminology {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why public?

Comment on lines +43 to +44
public static final Set<String> READ_ONLY_API_PREFIXES = withCommonsPrefixes(READ_ONLY_TERMS);
public static final Set<String> WRITE_API_PREFIXES = withCommonsPrefixes(WRITE_TERMS);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expose these through static getters if they need to be exposed. Direct field access limits our ability to change how these lists are constructed in the future.

Comment on lines +43 to +49
public static Set<String> getReadOnlyApiPrefixes() {
return withCommonsPrefixes(READ_ONLY_TERMS);
}

public static Set<String> getWriteApiPrefixes() {
return withCommonsPrefixes(WRITE_TERMS);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to keep computing these every time.Just store those in the constants, make them private but expose them via the getters.

@chenliu0831
chenliu0831 enabled auto-merge (squash) June 10, 2025 16:09
@chenliu0831
chenliu0831 merged commit e60a6b2 into main Jun 10, 2025
2 checks passed
@chenliu0831
chenliu0831 deleted the allow-api-aws-endpoints branch June 10, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants